home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CCounterDocument.h
-
- Contains: Sample code to accompany Chapter 12 of
- "An Introduction to Macintosh Programming for Windows Programmers".
-
- Written by: Worldwide Developer Technical Support
-
- Copyright: 1999 Apple Computer, Inc., All Rights Reserved
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
-
- */
- #pragma once
-
- #include <LSingleDoc.h>
- #include "CCounter.h"
-
- // =================================================================================
- class CCounterDocument : public LSingleDoc {
- public:
- CCounterDocument(LCommander* inSuper, FSSpec* inFileSpec);
- // overrides
- virtual Boolean IsModified();
- virtual void DoAESave(FSSpec& inFileSpec, OSType inFileType);
- virtual void DoSave();
- virtual void DoRevert();
- virtual void DoPrint();
- virtual Boolean ObeyCommand(CommandT inCommand, void* ioParam);
- virtual void FindCommandStatus(CommandT inCommand,
- Boolean &outEnabled, Boolean &outUsesMark,
- Char16 &outMark, Str255 outName);
- protected:
- void NameNewDoc();
- void OpenFile(FSSpec& inFileSpec);
- void SetPrintFrameSize();
- // new members
- virtual LWindow* MakeControlsWindow();
- virtual Boolean AskForValue(Int32& newValue);
- private:
- CCounter stCounter;
- LCaption* mCaption;
- // LWindow* mWindow;
- // LFile* mFile;
- Boolean mIsDirty;
- };